import { Component, OnInit, Input } from '@angular/core';
import { TemplateViewModel } from "./index";

@Component({
    styleUrls: ['./index.scss'],
    selector: 'template-switch',
    template: `
        <div class="template-switch-container">
            <span class="pct70">
                <p class="title">{{option.title}}</p>
                <p class="content color-gray text-s">{{option.description}}</p>
            </span>
            <div class="pct30 sound-ope">
                <span class="icon"></span>
                <span>
                    <md-slide-toggle
                        [color]="color"
                        [checked]="option.checked"
                        (change)="option.operation(option)">
                    </md-slide-toggle>
                </span>
            </div>
            
        </div>
    `
})
export class SwitchTemplate implements OnInit {
    @Input() option: TemplateViewModel;
    constructor() { }
    color = "primary"
    ngOnInit() { }
}